package com.lmx.tour_management_system.pojo;


import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author lmx
 * @since 2021-01-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class Tourist implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 游客ID
     */
    @TableId(type = IdType.AUTO)
    private Integer touristId;

    /**
     * 姓名
     */
    private String touristName;

    /**
     * 性别
     */
    private Integer touristSex;

    /**
     * 电话号码
     */
    private String touristPhone;

    /**
     * 身份证号码
     */
    private String touristIdentidycard;

    /**
     * 登记时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    /**
     * 通过游客ID比较游客是否重复
     * @param tourist
     * @return
     */
    private boolean equals(Tourist tourist){
        if(this.getTouristId().equals(tourist.getTouristId())){
            return true;
        }else {
            return false;
        }
    }

}
